Computer architectures may utilize integers, memory addresses, and other data units of a certain bit-width, such as 16-bit, 32-bit, or 64-bit. Modern operating systems may operate at one of these bit-widths, in which case the operating system may be referred to as, for example, a 32-bit or 64-bit operating system. A 64-bit operating system has a substantially larger memory addressing space than a 32-bit operating system.
Computer applications are developed by writing source code in one of a variety of computer programming languages, such as C or C++. The source code includes variables of particular data types. A data type may be incompatible with one or more operating system bit-widths (e.g., 16-bit, 32-bit, or 64-bit). For example, source code developed for a 32-bit operating system may utilize a data type (e.g., a pointer) which is incompatible with a 64-bit version of the same operating system, causing the source code to be incompatible with the 64-bit operating system.
Porting source code from one bit-width to another bit-width requires converting each data type incompatible with the bit-width of the destination operating system to a data type which is compatible in a process called “thunking.” For example, a 32-bit pointer data type is incompatible with a 64-bit operating system due to memory addressing differences in 32- and 64-bit operating systems. Thus, a 32-bit pointer may be thunked to a 64-bit pointer for compatibility.
An annotation is a special form of syntactic metadata that can be added to the source code of software. Classes, methods, variables, parameters and packages may be annotated. Annotations can influence the run-time behavior of a resulting compiled application.